import request from '@/utils/request';

// oem查询代理列表：http://localhost/business/oemAgent/page
// oem代理列表查询商家：http://localhost/business/MerchantManagement/oemMerchantId

 
// oem查询代理列表
export async function oemQueryAgentList (data) {
	const res = await request.post('/business/oemAgent/page', data)
	if (res.data.code === 2000) {
	  return res.data;
	}
	// console.log(res)
	// return res
	return Promise.reject(new Error(res));
  }

//  oem代理列表查询商家  
  
export async function oemAgentListQueryBusiness (data) {
	const res = await request.post('/business/MerchantManagement/notApplyforMerchant', data)
	if (res.data.code === 2000) {
	  return res.data;
	}
	// console.log(res)
	// return res
	return Promise.reject(new Error(res));
  }

  /**
   * @param
   */

export async function pageListOem(params) {
	const res = await request.post('/business/wechatpay/pageList', params);
	if (res.data.code === 2000) {
	  return res.data.data;
	}
	return Promise.reject(new Error(res.data.message));
  }

  export async function selectByPrimaryKey (data) {
	const res = await request.post('/business/wechatpay/selectByPrimaryKey',data)
	console.log(res.data)
	if (res.data.code === 2000) {
	  return res.data;
	}
	// return res
	return Promise.reject(new Error(res));
  }